import 'package:love_newf/generated/json/base/json_convert_content.dart';
import 'package:love_newf/app/com/model/user_info_model.dart';

UserInfoModel $UserInfoModelFromJson(Map<String, dynamic> json) {
  final UserInfoModel userInfoModel = UserInfoModel();
  final int? userId = jsonConvert.convert<int>(json['userId']);
  if (userId != null) {
    userInfoModel.userId = userId;
  }
  final String? phone = jsonConvert.convert<String>(json['phone']);
  if (phone != null) {
    userInfoModel.phone = phone;
  }
  final String? userCode = jsonConvert.convert<String>(json['userCode']);
  if (userCode != null) {
    userInfoModel.userCode = userCode;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    userInfoModel.avatar = avatar;
  }
  final String? introduction = jsonConvert.convert<String>(
      json['introduction']);
  if (introduction != null) {
    userInfoModel.introduction = introduction;
  }
  final String? nick = jsonConvert.convert<String>(json['nick']);
  if (nick != null) {
    userInfoModel.nick = nick;
  }
  final int? sex = jsonConvert.convert<int>(json['sex']);
  if (sex != null) {
    userInfoModel.sex = sex;
  }
  final int? age = jsonConvert.convert<int>(json['age']);
  if (age != null) {
    userInfoModel.age = age;
  }
  final String? degree = jsonConvert.convert<String>(json['degree']);
  if (degree != null) {
    userInfoModel.degree = degree;
  }
  final String? marriage = jsonConvert.convert<String>(json['marriage']);
  if (marriage != null) {
    userInfoModel.marriage = marriage;
  }
  final int? height = jsonConvert.convert<int>(json['height']);
  if (height != null) {
    userInfoModel.height = height;
  }
  final String? monthlyIncome = jsonConvert.convert<String>(
      json['monthlyIncome']);
  if (monthlyIncome != null) {
    userInfoModel.monthlyIncome = monthlyIncome;
  }
  final String? vocation = jsonConvert.convert<String>(json['vocation']);
  if (vocation != null) {
    userInfoModel.vocation = vocation;
  }
  final String? province = jsonConvert.convert<String>(json['province']);
  if (province != null) {
    userInfoModel.province = province;
  }
  final String? city = jsonConvert.convert<String>(json['city']);
  if (city != null) {
    userInfoModel.city = city;
  }
  final int? whetherRealName = jsonConvert.convert<int>(
      json['whetherRealName']);
  if (whetherRealName != null) {
    userInfoModel.whetherRealName = whetherRealName;
  }
  final int? realPerson = jsonConvert.convert<int>(json['realPerson']);
  if (realPerson != null) {
    userInfoModel.realPerson = realPerson;
  }
  final int? taAge = jsonConvert.convert<int>(json['taAge']);
  if (taAge != null) {
    userInfoModel.taAge = taAge;
  }
  final String? taProvince = jsonConvert.convert<String>(json['taProvince']);
  if (taProvince != null) {
    userInfoModel.taProvince = taProvince;
  }
  final int? taHeight = jsonConvert.convert<int>(json['taHeight']);
  if (taHeight != null) {
    userInfoModel.taHeight = taHeight;
  }
  final String? taDegree = jsonConvert.convert<String>(json['taDegree']);
  if (taDegree != null) {
    userInfoModel.taDegree = taDegree;
  }
  final String? taMonthlyIncome = jsonConvert.convert<String>(
      json['taMonthlyIncome']);
  if (taMonthlyIncome != null) {
    userInfoModel.taMonthlyIncome = taMonthlyIncome;
  }
  final int? vipAccumu = jsonConvert.convert<int>(json['vipAccumu']);
  if (vipAccumu != null) {
    userInfoModel.vipAccumu = vipAccumu;
  }
  final int? inviteUserId = jsonConvert.convert<int>(json['inviteUserId']);
  if (inviteUserId != null) {
    userInfoModel.inviteUserId = inviteUserId;
  }
  final String? inviteTime = jsonConvert.convert<String>(json['inviteTime']);
  if (inviteTime != null) {
    userInfoModel.inviteTime = inviteTime;
  }
  final int? firstLogin = jsonConvert.convert<int>(json['firstLogin']);
  if (firstLogin != null) {
    userInfoModel.firstLogin = firstLogin;
  }
  final int? online = jsonConvert.convert<int>(json['online']);
  if (online != null) {
    userInfoModel.online = online;
  }
  final int? onLive = jsonConvert.convert<int>(json['onLive']);
  if (onLive != null) {
    userInfoModel.onLive = onLive;
  }
  final int? roomId = jsonConvert.convert<int>(json['roomId']);
  if (roomId != null) {
    userInfoModel.roomId = roomId;
  }
  final int? fansCount = jsonConvert.convert<int>(json['fansCount']);
  if (fansCount != null) {
    userInfoModel.fansCount = fansCount;
  }
  final int? bindAlipay = jsonConvert.convert<int>(json['bindAlipay']);
  if (bindAlipay != null) {
    userInfoModel.bindAlipay = bindAlipay;
  }
  final int? bindWx = jsonConvert.convert<int>(json['bindWx']);
  if (bindWx != null) {
    userInfoModel.bindWx = bindWx;
  }
  final int? bindPhone = jsonConvert.convert<int>(json['bindPhone']);
  if (bindPhone != null) {
    userInfoModel.bindPhone = bindPhone;
  }
  final int? isBlock = jsonConvert.convert<int>(json['isBlock']);
  if (isBlock != null) {
    userInfoModel.isBlock = isBlock;
  }
  final int? isFriend = jsonConvert.convert<int>(json['isFriend']);
  if (isFriend != null) {
    userInfoModel.isFriend = isFriend;
  }
  final String? inviteUrl = jsonConvert.convert<String>(json['inviteUrl']);
  if (inviteUrl != null) {
    userInfoModel.inviteUrl = inviteUrl;
  }
  final String? avatarFrameUrl = jsonConvert.convert<String>(
      json['avatarFrameUrl']);
  if (avatarFrameUrl != null) {
    userInfoModel.avatarFrameUrl = avatarFrameUrl;
  }
  final int? vipGrade = jsonConvert.convert<int>(json['vipGrade']);
  if (vipGrade != null) {
    userInfoModel.vipGrade = vipGrade;
  }
  final List<UserInfoUserLabels>? userLabels = (json['userLabels'] as List<
      dynamic>?)
      ?.map(
          (e) =>
      jsonConvert.convert<UserInfoUserLabels>(e) as UserInfoUserLabels)
      .toList();
  if (userLabels != null) {
    userInfoModel.userLabels = userLabels;
  }
  final String? beautifulCodeUrl = jsonConvert.convert<String>(
      json['beautifulCodeUrl']);
  if (beautifulCodeUrl != null) {
    userInfoModel.beautifulCodeUrl = beautifulCodeUrl;
  }
  final String? wxOpenId = jsonConvert.convert<String>(json['wxOpenId']);
  if (wxOpenId != null) {
    userInfoModel.wxOpenId = wxOpenId;
  }
  final String? wxUnionId = jsonConvert.convert<String>(json['wxUnionId']);
  if (wxUnionId != null) {
    userInfoModel.wxUnionId = wxUnionId;
  }
  final String? alipayOpenId = jsonConvert.convert<String>(
      json['alipayOpenId']);
  if (alipayOpenId != null) {
    userInfoModel.alipayOpenId = alipayOpenId;
  }
  final String? realName = jsonConvert.convert<String>(json['realName']);
  if (realName != null) {
    userInfoModel.realName = realName;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    userInfoModel.status = status;
  }
  final int? cancelStatus = jsonConvert.convert<int>(json['cancelStatus']);
  if (cancelStatus != null) {
    userInfoModel.cancelStatus = cancelStatus;
  }
  final int? prohibition = jsonConvert.convert<int>(json['prohibition']);
  if (prohibition != null) {
    userInfoModel.prohibition = prohibition;
  }
  return userInfoModel;
}

Map<String, dynamic> $UserInfoModelToJson(UserInfoModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['userId'] = entity.userId;
  data['phone'] = entity.phone;
  data['userCode'] = entity.userCode;
  data['avatar'] = entity.avatar;
  data['introduction'] = entity.introduction;
  data['nick'] = entity.nick;
  data['sex'] = entity.sex;
  data['age'] = entity.age;
  data['degree'] = entity.degree;
  data['marriage'] = entity.marriage;
  data['height'] = entity.height;
  data['monthlyIncome'] = entity.monthlyIncome;
  data['vocation'] = entity.vocation;
  data['province'] = entity.province;
  data['city'] = entity.city;
  data['whetherRealName'] = entity.whetherRealName;
  data['realPerson'] = entity.realPerson;
  data['taAge'] = entity.taAge;
  data['taProvince'] = entity.taProvince;
  data['taHeight'] = entity.taHeight;
  data['taDegree'] = entity.taDegree;
  data['taMonthlyIncome'] = entity.taMonthlyIncome;
  data['vipAccumu'] = entity.vipAccumu;
  data['inviteUserId'] = entity.inviteUserId;
  data['inviteTime'] = entity.inviteTime;
  data['firstLogin'] = entity.firstLogin;
  data['online'] = entity.online;
  data['onLive'] = entity.onLive;
  data['roomId'] = entity.roomId;
  data['fansCount'] = entity.fansCount;
  data['bindAlipay'] = entity.bindAlipay;
  data['bindWx'] = entity.bindWx;
  data['bindPhone'] = entity.bindPhone;
  data['isBlock'] = entity.isBlock;
  data['isFriend'] = entity.isFriend;
  data['inviteUrl'] = entity.inviteUrl;
  data['avatarFrameUrl'] = entity.avatarFrameUrl;
  data['vipGrade'] = entity.vipGrade;
  data['userLabels'] = entity.userLabels.map((v) => v.toJson()).toList();
  data['beautifulCodeUrl'] = entity.beautifulCodeUrl;
  data['wxOpenId'] = entity.wxOpenId;
  data['wxUnionId'] = entity.wxUnionId;
  data['alipayOpenId'] = entity.alipayOpenId;
  data['realName'] = entity.realName;
  data['status'] = entity.status;
  data['cancelStatus'] = entity.cancelStatus;
  data['prohibition'] = entity.prohibition;
  return data;
}

extension UserInfoModelExtension on UserInfoModel {
  UserInfoModel copyWith({
    int? userId,
    String? phone,
    String? userCode,
    String? avatar,
    String? introduction,
    String? nick,
    int? sex,
    int? age,
    String? degree,
    String? marriage,
    int? height,
    String? monthlyIncome,
    String? vocation,
    String? province,
    String? city,
    int? whetherRealName,
    int? realPerson,
    int? taAge,
    String? taProvince,
    int? taHeight,
    String? taDegree,
    String? taMonthlyIncome,
    int? vipAccumu,
    int? inviteUserId,
    String? inviteTime,
    int? firstLogin,
    int? online,
    int? onLive,
    int? roomId,
    int? fansCount,
    int? bindAlipay,
    int? bindWx,
    int? bindPhone,
    int? isBlock,
    int? isFriend,
    String? inviteUrl,
    String? avatarFrameUrl,
    int? vipGrade,
    List<UserInfoUserLabels>? userLabels,
    String? beautifulCodeUrl,
    String? wxOpenId,
    String? wxUnionId,
    String? alipayOpenId,
    String? realName,
    int? status,
    int? cancelStatus,
    int? prohibition,
  }) {
    return UserInfoModel()
      ..userId = userId ?? this.userId
      ..phone = phone ?? this.phone
      ..userCode = userCode ?? this.userCode
      ..avatar = avatar ?? this.avatar
      ..introduction = introduction ?? this.introduction
      ..nick = nick ?? this.nick
      ..sex = sex ?? this.sex
      ..age = age ?? this.age
      ..degree = degree ?? this.degree
      ..marriage = marriage ?? this.marriage
      ..height = height ?? this.height
      ..monthlyIncome = monthlyIncome ?? this.monthlyIncome
      ..vocation = vocation ?? this.vocation
      ..province = province ?? this.province
      ..city = city ?? this.city
      ..whetherRealName = whetherRealName ?? this.whetherRealName
      ..realPerson = realPerson ?? this.realPerson
      ..taAge = taAge ?? this.taAge
      ..taProvince = taProvince ?? this.taProvince
      ..taHeight = taHeight ?? this.taHeight
      ..taDegree = taDegree ?? this.taDegree
      ..taMonthlyIncome = taMonthlyIncome ?? this.taMonthlyIncome
      ..vipAccumu = vipAccumu ?? this.vipAccumu
      ..inviteUserId = inviteUserId ?? this.inviteUserId
      ..inviteTime = inviteTime ?? this.inviteTime
      ..firstLogin = firstLogin ?? this.firstLogin
      ..online = online ?? this.online
      ..onLive = onLive ?? this.onLive
      ..roomId = roomId ?? this.roomId
      ..fansCount = fansCount ?? this.fansCount
      ..bindAlipay = bindAlipay ?? this.bindAlipay
      ..bindWx = bindWx ?? this.bindWx
      ..bindPhone = bindPhone ?? this.bindPhone
      ..isBlock = isBlock ?? this.isBlock
      ..isFriend = isFriend ?? this.isFriend
      ..inviteUrl = inviteUrl ?? this.inviteUrl
      ..avatarFrameUrl = avatarFrameUrl ?? this.avatarFrameUrl
      ..vipGrade = vipGrade ?? this.vipGrade
      ..userLabels = userLabels ?? this.userLabels
      ..beautifulCodeUrl = beautifulCodeUrl ?? this.beautifulCodeUrl
      ..wxOpenId = wxOpenId ?? this.wxOpenId
      ..wxUnionId = wxUnionId ?? this.wxUnionId
      ..alipayOpenId = alipayOpenId ?? this.alipayOpenId
      ..realName = realName ?? this.realName
      ..status = status ?? this.status
      ..cancelStatus = cancelStatus ?? this.cancelStatus
      ..prohibition = prohibition ?? this.prohibition;
  }
}

UserInfoUserLabels $UserInfoUserLabelsFromJson(Map<String, dynamic> json) {
  final UserInfoUserLabels userInfoUserLabels = UserInfoUserLabels();
  final int? anchorUserId = jsonConvert.convert<int>(json['anchorUserId']);
  if (anchorUserId != null) {
    userInfoUserLabels.anchorUserId = anchorUserId;
  }
  final String? labelName = jsonConvert.convert<String>(json['labelName']);
  if (labelName != null) {
    userInfoUserLabels.labelName = labelName;
  }
  final int? labelType = jsonConvert.convert<int>(json['labelType']);
  if (labelType != null) {
    userInfoUserLabels.labelType = labelType;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    userInfoUserLabels.url = url;
  }
  return userInfoUserLabels;
}

Map<String, dynamic> $UserInfoUserLabelsToJson(UserInfoUserLabels entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['anchorUserId'] = entity.anchorUserId;
  data['labelName'] = entity.labelName;
  data['labelType'] = entity.labelType;
  data['url'] = entity.url;
  return data;
}

extension UserInfoUserLabelsExtension on UserInfoUserLabels {
  UserInfoUserLabels copyWith({
    int? anchorUserId,
    String? labelName,
    int? labelType,
    String? url,
  }) {
    return UserInfoUserLabels()
      ..anchorUserId = anchorUserId ?? this.anchorUserId
      ..labelName = labelName ?? this.labelName
      ..labelType = labelType ?? this.labelType
      ..url = url ?? this.url;
  }
}